//
//  ChatRoomViewController.h
//  iPhoneXMPP
//
//  Created by XiongYingqi on 14-5-13.
//
//

#import <UIKit/UIKit.h>
#import "XMPPMessage.h"
#import "XMPPJID.h"
#import "XMPPRoom.h"
#import "XMPPRoomCoreDataStorage.h"
#import "XMPPUserCoreDataStorageObject.h"

@interface ChatRoomViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, XMPPRoomDelegate>
@property(weak, nonatomic) IBOutlet UITableView *tableView;
@property(weak, nonatomic) IBOutlet UILabel *jidLabel;
@property(weak, nonatomic) IBOutlet UIButton *sendButton;
@property(weak, nonatomic) XMPPUserCoreDataStorageObject *withUser;


/**
* 根据jid获取ChatRoomViewController，如果已经创建则返回实例，如果从未打开过则创建实例
*/
+ (id)getRoom:(XMPPUserCoreDataStorageObject *)withUser;

- (IBAction)hideKeyboard:(id)sender;

- (IBAction)sendMessage:(id)sender;

- (IBAction)backViewTouch:(id)sender;

@property(weak, nonatomic) IBOutlet UITextField *messageField;
@end
